<template>
  <div class="walletTitle">
    <div class="title">{{ title }}</div>
    <div class="space"></div>
    <div class="walletText" @click="showWallet">连接钱包</div>
    <div v-if="isShow">
      <DialogWallet @onCloseWallet="closeWallet" />
    </div>
  </div>
</template>
<script>
import DialogWallet from "./dialogWallet.vue";
export default {
  components: {
    DialogWallet,
  },
  props: {
    title: {
      type: String,
      default: null,
    },
  },
  data: () => ({
    isShow: false,
  }),
  methods: {
    showWallet() {
      this.isShow = true;
    },
    closeWallet() {
      this.isShow = false;
    },
  },
};
</script>
<style  lang="scss" scoped>
@import "./../common/styles/common.scss";
.walletTitle {
  height: 77px;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  border-bottom: 1px solid #e8e8e8;
  width: 1200px;
  margin: 0 auto;
  position: relative;
  @media screen and (max-width: 1519px) {
    width: 1092px;
  }
  @media screen and (max-width: 1439px) {
    width: 932px;
  }
  @media screen and (max-width: 1279px) {
    width: calc(100% - 60px);
  }
  @media screen and (max-width: 960px) {
    width: 100vw;
    overflow: hidden;
    padding: 0 15px;
  }
  .title {
    font-size: 24px;
    color: #431216;
    font-weight: 700;
  }

  .space {
    -webkit-box-flex: 1;
    -ms-flex: 1;
    flex: 1;
  }
  .walletText {
    height: 38px;
    font-size: 14px;
    background: #fad551;
    border: 0 none;
    color: #431216;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    outline: none;
    text-align: center;
    cursor: pointer;
    font-weight: 700;
    padding: 0 18px;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    border-radius: 12px;
    -webkit-transition: -webkit-transform 0.2s ease;
    transition: -webkit-transform 0.2s ease;
    transition: transform 0.2s ease;
    transition: transform 0.2s ease, -webkit-transform 0.2s ease;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    line-height: 1.1;
    -webkit-box-sizing: border-box;
    box-sizing: border-box;
  }
}
</style>